#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main(){
  string s,sc;
  cin>>s;
  int i=0,time=0,length=1;
  while(i<s.size()){
    sc=s.substr(i,length);
    string rev=sc;
    reverse(rev.begin(),rev.end());
    time+=(rev==sc);
    i+=length;
    length++;
  }
  cout<<time;
}